#!/usr/bin/env python2.5
# encoding: utf-8
"""
InputStream.py

Created by Alakazam on 2007-07-05.
Copyright (c) 2007 . All rights reserved.
"""

from Stream import *

class InputStream(Stream):
  # Abstract methods
  def __init__(self): abstract()
  
  def set(self, startTime, value, endTime = None): abstract()
  
  def unset(self, startTime, endTime = None): abstract()
  
  def delete(self): abstract()
  
  
  # Non abstract methods
  def __setitem__(self, key, value):
    if isinstance(key, slice):
      return self.set(key.start, value, key.stop)
    else:
      return self.set(key, value)
  
  def __delitem__(self, key):
    if isinstance(key, slice):
      return self.unset(key.start, endTime = key.stop)
    else:
      return self.unset(key)
    
  
